<?xml version='1.0' encoding='UTF-8' ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:c="http://java.sun.com/jsp/jstl/core"
      xmlns:f="http://java.sun.com/jsf/core">
    <h:head>
        <title>Recherche</title>
        <meta http-equiv="#{utilisateurJSFBean.accessDenied}" content="0; URL=login.xhtml"/>
    </h:head>
    <h:body>
        <h1>Résultat de recherche</h1>
        <h:form id="subscribeform">
            <table>
                <tr>
                    <td>Nom</td>
                    <td>Prénom</td>
                    <td>Date de naissance</td>
                    <td>Photo</td>
                    <td>Ajouter</td>
                </tr>
                <c:forEach var="personne" items="#{utilisateurJSFBean.resultRecherche}" >
                    <tr>
                        <td>${personne.nom}</td>
                        <td>${personne.prenom}</td>
                        <td>${personne.dateDeNaissance}</td>
                        <td>photo !</td>
                        <td>
                            <h:commandButton value="Ajouter aux amis" action="#{utilisateurJSFBean.addFriend(personne)}">
                                <f:param name="u" value="personne" />
                            </h:commandButton>
                        </td>
                    </tr>
                </c:forEach>
            </table>
        </h:form>
    </h:body>
</html>

